import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Conduct from '../components/menu/Conduct.vue'
import Apply from '../components/menu/Apply.vue'
import Trial from '../components/menu/Trial.vue'
import Statistics from '../components/menu/Statistics.vue'
import Register from '../components/menu/Register.vue'
import StartMeeting from "../components/menu/StartMeeting"
import Perfect from "../components/menu/Perfect"
import MeetingApply from "../components/menu/MeetingApply";
import RetroactiveApply from "../components/menu/RetroactiveApply";
import EndMeeting from "../components/menu/EndMeeting";
import Homepage from "../components/menu/Homepage";
import punchCard from "../components/menu/punchCard";
Vue.use(VueRouter)

const routes = [
  {
    path: '/', // 如果要改这个，就比较麻烦
    name: 'Home',
    redirect: '/Homepage', // 就是这个好像是配置子路由的，那这样好像写不了，我想想
    // 我记得可以配置一个默认的路由，我再写写，我记得是给路由配置一个属性，
    component: Home,
    children:[
      {
        path: "1",
        component: Homepage,
      },
      {
        path: "2",
        component: Conduct,
      },
      {
        path: "3",
        component: Apply,
      },
      { 
        path: "4",
        component: Trial,
      },
      {
        path: "5",
        component: Statistics
      },
      {
        path: "12",
        component: Register
      },
      {
        path: "7",
        component: StartMeeting
      },
      {
        path: "8",
        component: Perfect,
      },
      {
        path: "9",
        component: MeetingApply,
      },
      {
        path: "10",
        component: RetroactiveApply,
      },
      {
        path: "11",
        component: EndMeeting,
      },
      {
        path: "14",
        component: punchCard,
      }
    ]
  },
  {
    path: '/login',
    name: 'Login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import('../views/Login.vue')
  },{
    path:'/setup',
    component: () => import('../components/menu/Perfect.vue')
  },
  {
    path: '/Homepage',
    component: () => import('../components/menu/Homepage'),

  }
]
 
const router = new VueRouter({
  routes
})

export default router
